import request from '@/utils/request'

export function findAll() {
  return request({
    url: '/resource/findAll',
    method: 'get'
  })
}

export function page(data) {
  return request({
    url: '/resource/page',
    method: 'get',
    params: data
  })
}

export function create(data) {
  return request({
    url: '/resource',
    method: 'post',
    data
  })
}

export function edit(data) {
  return request({
    url: '/resource',
    method: 'put',
    data
  })
}

export function deleteByIds(ids) {
  return request({
    url: `/resource`,
    method: 'delete',
    data: ids
  })
}
